﻿<%@ Page Language="C#" MasterPageFile="~/admin/Admin.master" AutoEventWireup="true" CodeFile="HienthiCT_DDHLK.aspx.cs" Inherits="admin_HienthiCT_DDHLK" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script type="text/javascript">
    function isconfirm() {
        var ck = confirm('Bạn có chắc xoá hay không?');
        if (ck == true)
            return true;
        else
            return false;
    }

        </script>

    <form id="form1" runat="server">
    <table cellspacing="0" cellpadding="0" border="0">
        <tr>
            <td style="width: 624px">
            <table cellspacing="0" cellpadding="0" border="1" 
                    style="width: 600px">        
                <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1"  >
                <HeaderTemplate >
                <tr>
                                <th align=center>Mã ĐĐH</th> 
							    <th  align=center>Mã Linh Kiện</th>
							    <th  align=center>Số Lượng</th>
							    <th  align=center>Giá Bán</th>
							    <th  align=center>Xoá</th>
							     <th  align=center>Sửa</th>
                </tr>
                </HeaderTemplate>
                
                <ItemTemplate>
                <tr>
                <td align=center><asp:HyperLink ID="hplmaddh" runat="server" NavigateUrl='<%# "~/ThemDonDatHang.aspx?maddh=" + DataBinder.Eval(Container.DataItem,"maddh")%>' Text='<%# DataBinder.Eval(Container.DataItem,"maddh")%>' /></td>
							<td  align=center><asp:HyperLink ID="hplmalinhkien" runat="server" NavigateUrl='<%# "~/ThemLK.aspx?malinhkien=" + DataBinder.Eval(Container.DataItem,"malinhkien")%>' Text='<%# DataBinder.Eval(Container.DataItem,"malinhkien")%>' /></td>
							<td  align=center><%#Eval("soluong")%></td>
							<td  align=center><%#Eval("giaban")%></td>							
							<td  align=center><asp:ImageButton ID="imagebtxoa" runat="server" CommandArgument='dk' CommandName="Xoa" OnClientClick='return isconfirm()'
            ImageUrl="images/action_remove.png" /></td>
                                <td align=center> <a href="SuaCT_DDHLK.aspx?maddh=<%#Eval("maddh")%>"> <img src="images/action_check.png"  alt ="Check" id ="check" /></a></td>
                
                </tr>
                
                
                </ItemTemplate>
                
                
                
                
                
                </asp:Repeater>
                
                   </table>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:maytinhxachtayConnectionString %>" 
                    SelectCommand="SELECT [MaDDH], [MaLinhKien], [SoLuong], [GiaBan] FROM [CT_DonDatHangLK]">
                </asp:SqlDataSource>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td style="width: 624px">
                <asp:Repeater ID="Repeater2" runat="server">
                </asp:Repeater>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        </table>
    </form>
</asp:Content>

